<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysUserAccountBean.id}"/>
		<f:event type="preRenderView" listener="#{sysUserAccountBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys User Account"/>

	<ui:define name="header">
		Sys User Account
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysUserAccountBean.id}">
				Edit existing Sys User Account
			</c:when>
			<c:otherwise>
				Create a new Sys User Account
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysUserAccountBeanSysUserAccountUserNo" value="User No:"/>
				<h:panelGroup>
					<h:inputText id="sysUserAccountBeanSysUserAccountUserNo" required="true" value="#{sysUserAccountBean.sysUserAccount.userNo}"/>
					<h:message for="sysUserAccountBeanSysUserAccountUserNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysUserAccountBeanSysUserAccountHrEmp" value="Hr Emp:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="sysUserAccountBeanSysUserAccountHrEmp" value="#{sysUserAccountBean.sysUserAccount.hrEmp}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysUserAccountBeanSysUserAccountHrEmp" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysUserAccountBeanSysUserAccountUserName" value="User Name:"/>
				<h:panelGroup>
					<h:inputText id="sysUserAccountBeanSysUserAccountUserName" maxLength="50" value="#{sysUserAccountBean.sysUserAccount.userName}"/>
					<h:message for="sysUserAccountBeanSysUserAccountUserName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysUserAccountBeanSysUserAccountUserPassword" value="User Password:"/>
				<h:panelGroup>
					<h:inputText id="sysUserAccountBeanSysUserAccountUserPassword" maxLength="50" value="#{sysUserAccountBean.sysUserAccount.userPassword}"/>
					<h:message for="sysUserAccountBeanSysUserAccountUserPassword" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysUserAccountBeanSysUserAccountSysUserParameters" value="Sys User Parameters:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysUserAccountBean.sysUserAccount.sysUserParameters}"/>
					<h:dataTable id="sysUserAccountBeanSysUserAccountSysUserParameters" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Parameter Master"/>
							</f:facet>
							<h:link outcome="/sysUserParameter/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysParameterMaster" value="#{forgeview:display(_item.sysParameterMaster)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysParameterMasterBean.converter}" id="sysUserParameterBeanAddSysParameterMaster" value="#{sysUserParameterBean.add.sysParameterMaster}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysParameterMasterBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysUserParameterBeanAddSysParameterMaster" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Param String Val"/>
							</f:facet>
							<h:link outcome="/sysUserParameter/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemParamStringVal" value="#{_item.paramStringVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserParameterBeanAddParamStringVal" maxLength="50" value="#{sysUserParameterBean.add.paramStringVal}"/>
								<h:message for="sysUserParameterBeanAddParamStringVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Param Number Val"/>
							</f:facet>
							<h:link outcome="/sysUserParameter/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemParamNumberVal" value="#{_item.paramNumberVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserParameterBeanAddParamNumberVal" value="#{sysUserParameterBean.add.paramNumberVal}"/>
								<h:message for="sysUserParameterBeanAddParamNumberVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysUserParameterBean.added)}" id="sysUserAccountBeanSysUserAccountSysUserParametersAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysUserParameterBean.add.sysUserAccount}" value="#{sysUserAccountBean.sysUserAccount}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysUserAccountBeanSysUserAccountSysUserDatatableConfigs" value="Sys User Datatable Configs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysUserAccountBean.sysUserAccount.sysUserDatatableConfigs}"/>
					<h:dataTable id="sysUserAccountBeanSysUserAccountSysUserDatatableConfigs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Allow Is Display"/>
							</f:facet>
							<h:link outcome="/sysUserDatatableConfig/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemAllowIsDisplay" value="#{_item.allowIsDisplay}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserDatatableConfigBeanAddAllowIsDisplay" value="#{sysUserDatatableConfigBean.add.allowIsDisplay}"/>
								<h:message for="sysUserDatatableConfigBeanAddAllowIsDisplay" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Allow Is Edit"/>
							</f:facet>
							<h:link outcome="/sysUserDatatableConfig/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemAllowIsEdit" value="#{_item.allowIsEdit}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserDatatableConfigBeanAddAllowIsEdit" value="#{sysUserDatatableConfigBean.add.allowIsEdit}"/>
								<h:message for="sysUserDatatableConfigBeanAddAllowIsEdit" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Seq No"/>
							</f:facet>
							<h:link outcome="/sysUserDatatableConfig/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSeqNo" value="#{_item.seqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserDatatableConfigBeanAddSeqNo" value="#{sysUserDatatableConfigBean.add.seqNo}"/>
								<h:message for="sysUserDatatableConfigBeanAddSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysUserDatatableConfigBean.added)}" id="sysUserAccountBeanSysUserAccountSysUserDatatableConfigsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysUserDatatableConfigBean.add.sysUserAccount}" value="#{sysUserAccountBean.sysUserAccount}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysUserAccountBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysUserAccountBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysUserAccountBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysUserAccountBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>